<?php

class Users_Form_Forgetpassword extends Zend_Form {

    private $_translate = null;

    public function init() {
        $this->_translate = Zend_Registry::get('Zend_Translate');
        $this->setAction('/users/forgotpassword')
                ->setMethod('post');

        //email
        $email = new Zend_Form_Element_Text('email');
        $email->setLabel($this->_translate->_('email') . ':')
                ->setRequired(true)
                ->setOptions(array('size' => '100', 'placeholder' =>  $this->_translate->_('email_placeholder')))
                ->addFilter('StringToLower')
                ->addValidator('EmailAddress');

        //submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel($this->_translate->_('reset_password'))
                ->setOptions(array('class' => 'submit'))
                ->setAttrib('class', 'btn btn-success');

        $this->addElements(array($email, $submit));
    }

}

